home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 3735 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.5 KB  |  39 lines

  1. Path: castle.nando.net!news
  2. From: actuary@nando.net   (Bill McCarthy)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: command line argument help
  5. Date: 30 Jan 1996 21:58:26 GMT
  6. Organization: News & Observer Public Access
  7. Message-ID: <4em4a2$eta@castle.nando.net>
  8. References: <4edfth$ok@muss.CIS.McMaster.CA> <4egi4nINNncr@keats.ugrad.cs.ubc.ca> <4eikbc$cs9@host-3.cyberhighway.net> <4elm4f$c73@airdmhor.gen.nz>
  9. Reply-To: actuary@nando.net (Bill McCarthy)
  10. NNTP-Posting-Host: grail715.nando.net
  11. X-Newsreader: IBM NewsReader/2 v1.2
  12.  
  13. In <4elm4f$c73@airdmhor.gen.nz>, gumboot@airdmhor.gen.nz (Simon Hosie) writes:
  14. >mjellis@cyberhighway.net:
  15. >> void main(int argc, char *argv[])
  16. >  ^^^^
  17. >  This intrigues me.. what compiler are you using to not get told off for
  18. >that?  I'm using Watcom C, Borland C, and GCC.
  19.  
  20. Of course, "void main()" is not ANSI C.  However, I use those same three
  21. compilers under Warp.  Borland not only complains, it issues an error.
  22. Watcom gave no warning (/l=os2v2 /d2 /w4 /zp4 /zq are my test options),
  23. but that's not surprising to me -- since Watcom's sample code regularly
  24. uses "void main()" in the library function examples.  I was surprised the
  25. GCC gave no warning with my test options (-ansi -pedantic -Wall -ggdb
  26. -O0).
  27.  
  28. I'm curious, please email (before the flames begin for being off topic)
  29. your compiler options which give error messages under GCC & Watcom
  30. for code such as:
  31.  
  32. #include <stdio.h>
  33. void main( void ) { puts( "Hello, World!" ); }  
  34.  
  35. Bill McCarthy
  36. actuary@nando.net
  37. Wendell, NC  USA
  38.  
  39.